﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using Microsoft.Practices.Unity;
using ServiceStack.Redis;
using System.Web;


namespace WebClientTest
{
	class Program
	{
		static void Main(string[] args)
		{
			string baseurl = "http://www.17u.cn/cooperation.aspx?redirectUrl={0}&callbackData={1}&nickname={2}";
			string redirectUrl = HttpUtility.UrlEncode("http://touch.17u.cn/flight/PEK_SHA.html?flyofftime=2014-3-26&refid=26875429");
			string callbckdate = HttpUtility.UrlEncode("data=20140223");
			string nickname = HttpUtility.UrlEncode("测试");
			string result = string.Format(baseurl, redirectUrl, callbckdate, nickname);
			Console.WriteLine(result);
		}
	}

	public interface ILogger
	{
		void Write(string log);
	}

	public class FileLogger
	{
		public void Write(string log)
		{
			Console.WriteLine(log);
		}
	}

	public class Datebase
	{
	}
	public class CustomerDateBase : Datebase
	{
		private ILogger logger;
		public CustomerDateBase(ILogger logger)
		{
			this.logger = logger;
			container.RegisterType<ILogger, ILogger>();
			Datebase data = container.Resolve<CustomerDateBase>();
		}
		UnityContainer container = new UnityContainer();
	}
}
